[IA64] Avoid double free of VHPT for HVM domain
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Tue, 20 Mar 2007 15:24:02 +0000 (09:24 -0600)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Tue, 20 Mar 2007 15:24:02 +0000 (09:24 -0600)
commitc2c88dd44c9cf8d15a42ba65ad39b0234b24fbe0
tree88f81e0005a9c357c3d80cb6ffb9fc335acc1493
parent4aee81be211166058b8715958d4bdb65588073e1
[IA64] Avoid double free of VHPT for HVM domain

If vTLB area is not able to allocate with shortage of domheap,
Xen does a panic for double free of VHPT.

At first:
  vmx_final_setup_guest()
    -> init_domain_tlb()
         -> free_domain_vhpt()

At second:
  free_domain()
    -> vcpu_destroy()
         -> vmx_relinquish_vcpu_resources()
              -> free_domain_tlb()
                   -> free_domain_vhpt()

This patch avoids double free of VHPT by clearing v->arch.vhpt.hash
in free_domain_vhpt().

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
xen/arch/ia64/vmx/vmmu.c